package com.gdyzy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gdyzy.dto.UserDto;
import com.gdyzy.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 通过手机号查找用户
     * @param phone 手机号
     * @return  用户
     */
    @Select("select * from tbl_gdms_user user, tbl_gdms_role role where user.Roleid = role.Roleid and user.phone = #{phone}")
    public UserDto findByPhone(String phone);
}
